<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="/invite/js/jquery-1.11.1.min.js"></script>
</head>
<body>
{volist name="data" id="vo"}
 {$vo}
{/volist}
<div>
    {volist name="item.multi_pic" id="vo1"}
    <img src="/{$vo1}" height="100" />
    {/volist}
</div>
{$item.content}
<div><input name="noa" /></div>

<div>
    <input  maxlength="11" type="button" value="拨打电话" onclick="tel()" />
</div>
</body>
</html>
<script>
    function tel(){
        var noa = $('input').val();
        if(!noa){
            alert('电话号不能为空');
            return;
        }
        var nob = {$data['username']};
        $.ajax({
            url : '{:url("axb")}',
            data:{'noa':noa,'nob':nob},
            dataType:'json',
            success:function(data){
                console.log(data);
                //console.log(data.SecretBindDTO.SecretNo);
                if(data.Code == "OK"){
                    window.location.href = 'tel:'+data.SecretBindDTO.SecretNo;
                }else{
                    //alert(data.Message);
                    alert('请等待本次绑定失效或绑定失败');
                }
            }
        });
    }
</script>